PhysicsServer Class Reference

#include <PhysicsServer.h>

List of all members.

Public Member Functions

virtual ~PhysicsServer ()
bool init (int groundSizeX, int groundSizeY)
void shutdown ()
void setCrashId (int soundId)
bool registerClient (PhysicsClient *client)
bool update (double step)

Static Public Member Functions

static PhysicsServer * getInstance ()
static void collisionCallback (void *data, dGeomID o1, dGeomID o2)

Protected Attributes

int sound_id
int kacKez
dWorldID _world
dSpaceID _space
dJointGroupID _contactgroup
dSpaceID _envSpace
dGeomID _ground
vector< dGeomID > crashedGeomIds

Private Member Functions

 PhysicsServer ()
void checkCollision (void *data, dGeomID o1, dGeomID o2)

Private Attributes

vector< PhysicsClient * > _clientList

Static Private Attributes

static PhysicsServer _instance


Detailed Description

Interface for PhysicsServer class.


Constructor & Destructor Documentation

virtual PhysicsServer::~PhysicsServer (   )  [virtual]
 

A destructor.

PhysicsServer::PhysicsServer (   )  [private]
 

A constructor.


Member Function Documentation

void PhysicsServer::checkCollision (  void *  data,
dGeomID  o1,
dGeomID  o2
)  [private]
 

static void PhysicsServer::collisionCallback (  void *  data,
dGeomID  o1,
dGeomID  o2
)  [static]
 

a static member taking three argument and returning void.

Parameters:
data a void pointer.
o1 a dGeomID.
o2 a dGeomID. check collied geoms

static PhysicsServer* PhysicsServer::getInstance (   )  [inline, static]
 

bool PhysicsServer::init (  int  groundSizeX,
int  groundSizeY
) 
 

a normal member taking two arguments and returning a bool value.

Parameters:
groundSizeX an integer argument.
groundSizeY an integer argument.
Returns:
true if initialization is succesful creates physical world and space and set properties of these

bool PhysicsServer::registerClient (  PhysicsClient *  client  ) 
 

a normal member taking one argument and returning a bool value.

Parameters:
client a pointer to PhysicsClient.
Returns:
true if registration is succesful add client to _clientList
See also:
_clientList

void PhysicsServer::setCrashId (  int  soundId  ) 
 

void PhysicsServer::shutdown (   ) 
 

a normal member. destroy physical world, space and joint groups

bool PhysicsServer::update (  double  step  ) 
 

a normal member taking one argument and returning a bool value.

Parameters:
step a double argument.
Returns:
true if update is succesful update physical worlds simulation step,steps physical world, handles collisions, remove contact points


Member Data Documentation

vector<PhysicsClient*> PhysicsServer::_clientList [private]
 

a private member. list of physical clients

dJointGroupID PhysicsServer::_contactgroup [protected]
 

dSpaceID PhysicsServer::_envSpace [protected]
 

dGeomID PhysicsServer::_ground [protected]
 

PhysicsServer PhysicsServer::_instance [static, private]
 

dSpaceID PhysicsServer::_space [protected]
 

a protected variable. id of the physical space

dWorldID PhysicsServer::_world [protected]
 

a protected variable. id of the physical world

vector<dGeomID> PhysicsServer::crashedGeomIds [protected]
 

int PhysicsServer::kacKez [protected]
 

int PhysicsServer::sound_id [protected]
 


The documentation for this class was generated from the following file:
Generated on Sun May 28 18:44:01 2006 by  doxygen 1.4.6-NO